<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/init.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<jsp:include page="/WEB-INF/jsp/common/common.jsp" />
<script type="text/javascript">
	$(function() {
		$("#emp").hide();
	});
	function query() {
		$("#form1").submit();
	}

	function mySelect() {
		var $score = $("input[name='much']");
		$.each($score, function(i, n) {
			$score.attr("checked", "checked");
		});
	}

	function noSelect() {
		var $score = $("input[name='much']");
		$.each($score, function(i, n) {
			$score.attr("checked", false);
		});
	}

	function getResult(verify_id) {
		$("input[name='verify_id']").val(verify_id);
		var url = "${path}/ix/user/verify/get_result.htm";
		$("#form1").attr("action", url);
		$("#form1").submit();
	}

	function myInit() {
		var verifyvalue = "";
		var $score = $("input[name='much']:checked");
		$.each($score, function(i, n) {
			verifyvalue += $(this).val() + "@@";
		});
		$("input[name='verifyvalue']").val(verifyvalue);

		var url = "${path}/ix/user/verify/batch_save.htm";
		$("#form1").attr("action", url);
		$("#form1").submit();
	}

	function myEdit() {

		var verifyvalue = "";
		var $score = $("input[name='much']:checked");
		$.each($score, function(i, n) {
			verifyvalue += $(this).val();
		});

		if (verifyvalue.length == 0) {
			ohSnap("请选择", "success");
		} else {
			$("#emp").show();
			$("input:checkbox").each(function() {
				$(this).attr("disabled", true);
			});
			$(".myall").each(function() {
				$(this).hide();
			});
		}

	}
	function myNo() {
		$("input:checkbox").each(function() {
			$(this).attr("disabled", false);
		});
		$(".myall").each(function() {
			$(this).show();
		});
		$("#emp").hide();
	}
</script>
</head>
<body>
	<jsp:include page="/WEB-INF/jsp_lib/tip.jsp" />
	<div>
		<form action="${path}/ix/user/verify/list.htm" id="form1"
			method="post">
			<input type="hidden" name="verify_id" />
			<input type="hidden" name="verifyvalue" />
			<h2>
				<div>人员审核</div>
			</h2>
			<div class="query">
				<table width="100%" border="0" align="center" cellpadding="0"
					cellspacing="5">
					<tr>
						<td width="80" align="right"><strong>人员名称：</strong></td>
						<td width="200" align="left"><input name="srh_name"
							type="text" /></td>
						<td align="left"><a href="javascript:query();"> <img
								src="${path}/style_cp/img/query.jpg" name="Image4" width="85"
								height="27" border="0" id="Image4" />
						</a></td>
					</tr>
				</table>
			</div>

			<table width="100%" class="listlindex">
				<tr>
					<th style="width:10%"><a class="myall"
						href="javascript:mySelect();">【全选】</a><a class="myall"
						href="javascript:noSelect();">【取消】</a></th>

					<th>人员代码</th>
					<th>人员名称</th>
					<th>所属机构</th>
					<th>审核分类</th>
					<th>审核类型</th>
					<th>操作</th>
				</tr>
				<c:if test="${fn:length(userList)==0}">
					<tr>
						<td colspan="7"><div class="tip_div">暂无记录.</div></td>
					</tr>
				</c:if>
				<c:forEach items="${userList}" var="v">
					<tr>
						<td><input type="checkbox" name="much" value="${v._id}" /></td>
						<td>${v.u_code}</td>
						<td>${v.u_name}</td>
						<td>${v.u_bank}</td>
						<td>${v.flag_type}</td>
						<td>${v.flag_note}</td>
						<td><a href="javascript:getResult('${v._id}');" class="asave">
								【操作】 </a></td>
					</tr>
				</c:forEach>
			</table>
			<div id="response"></div>
			<div class="options">
				<a href="javascript:myEdit();" class="asave" style="float:left;">
					【批量操作】 </a>
				<div class="quotes">

					<page:page page="${page}" />
				</div>
				<div class="clear"></div>
			</div>
			<div id="emp"
				style="height: 400px;	position: fixed;	left: 36%;top: 30%;diaplay:none;">
				<div class="query">
					<h2>
						<div>操作</div>
					</h2>
					<table width="100%" class="listlindex">
						<tr>
							<th align="right">是否通过：</th>
							<td align="left" colspan="3"><input name="flag" value="通过"
								type="radio" checked="checked"/>通过 <input name="flag"
									value="不通过" type="radio"/>不通过 </td>
						</tr>
						<tr>
							<th align="right">备注：</th>
							<td align="left" colspan="3"><textarea name="note" rows="5"
									cols="50"></textarea></td>
						</tr>
					</table>
					<div>&nbsp;</div>
					<a href="javascript:myInit();">【确定】</a> <a
						href="javascript:myNo();">【取消】</a>
				</div>
			</div>
		</form>

	</div>
</body>
</html>